from django.contrib import admin
from .models import ExamRecord

@admin.register(ExamRecord)
class ExamRecordAdmin(admin.ModelAdmin):
    list_display = ('student', 'exam', 'subject', 'score', 'exam_duration', 'created_at')
    list_filter = ('exam', 'subject', 'created_at')
    search_fields = ('student__name', 'exam__name', 'subject__name')
    date_hierarchy = 'exam__exam_date'
